// 1. 从 `astro:content` 导入
import { defineCollection, z } from "astro:content";

// 2. 定义集合
const docsCollection = defineCollection({
  type: "content", // v2.5.0 及之后
  schema: z.object({
    title: z.string().optional(),
    sort: z.number().optional(),
  }),
});

const practiceCollection = defineCollection({
  type: "content", // v2.5.0 及之后
  schema: z.object({
    title: z.string().optional(),
    sort: z.number().optional(),
  }),
});

export const collections = {
  docs: docsCollection,
  practice: practiceCollection,
};
